package com.ruoyi.manage.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manage.mapper.GOrganizationMapper;
import com.ruoyi.manage.domain.GOrganization;
import com.ruoyi.manage.service.IGOrganizationService;

/**
 * 管养单位信Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-11
 */
@Service
public class GOrganizationServiceImpl implements IGOrganizationService 
{
    @Autowired
    private GOrganizationMapper gOrganizationMapper;

    /**
     * 查询管养单位信
     * 
     * @param orgId 管养单位信主键
     * @return 管养单位信
     */
    @Override
    public GOrganization selectGOrganizationByOrgId(String orgId)
    {
        return gOrganizationMapper.selectGOrganizationByOrgId(orgId);
    }

    /**
     * 查询管养单位信列表
     * 
     * @param gOrganization 管养单位信
     * @return 管养单位信
     */
    @Override
    public List<GOrganization> selectGOrganizationList(GOrganization gOrganization)
    {
        return gOrganizationMapper.selectGOrganizationList(gOrganization);
    }

    /**
     * 新增管养单位信
     * 
     * @param gOrganization 管养单位信
     * @return 结果
     */
    @Override
    public int insertGOrganization(GOrganization gOrganization)
    {
        gOrganization.setCreateTime(DateUtils.getNowDate());
        return gOrganizationMapper.insertGOrganization(gOrganization);
    }

    /**
     * 修改管养单位信
     * 
     * @param gOrganization 管养单位信
     * @return 结果
     */
    @Override
    public int updateGOrganization(GOrganization gOrganization)
    {
        gOrganization.setUpdateTime(DateUtils.getNowDate());
        return gOrganizationMapper.updateGOrganization(gOrganization);
    }

    /**
     * 批量删除管养单位信
     * 
     * @param orgIds 需要删除的管养单位信主键
     * @return 结果
     */
    @Override
    public int deleteGOrganizationByOrgIds(String[] orgIds)
    {
        return gOrganizationMapper.deleteGOrganizationByOrgIds(orgIds);
    }

    /**
     * 删除管养单位信信息
     * 
     * @param orgId 管养单位信主键
     * @return 结果
     */
    @Override
    public int deleteGOrganizationByOrgId(String orgId)
    {
        return gOrganizationMapper.deleteGOrganizationByOrgId(orgId);
    }
}
